<?php

/*
 * XWAMP后台管理系统权限节点数据
 * 
 * 支持字段：
 *  [string]title:标题
 *  [string]name:名称
 *  [string]code:代码
 *  [string]type:节点类型 (M(Menu):菜单;O(Operate):操作,F(File):文件,E(Element):页面元素),
 *  [boolean]enable:是否可用,
 *  [string]url:链接地址,
 *  [array]children:子项目,
 *  [string]comment:注解
 * @since 1.0 2014-7-11 by sutroon
 * @since 2.0 <2015-4-23> SoChishun 重新组织url
 * @since 3.0 <2015-7-30> SoChishun 新增code字段
 * @since 4.0 <2015-9-19> SoChishun 重构以适合RBAC自动拦截规则
 */
return array(
    'table' => 't_porg_auth_rule', // 数据表名称
    /* 会员模块 */
    array(
        'title' => '会员',
        'code' => 'M1_HY',
        'children' => array(
            array(
                'title' => '会员管理',
                'code' => 'KH_M2_HYGL',
                'children' => array(
                    array('name' => 'Member.list_member', 'level' => '2', 'title' => '会员管理', 'code' => 'YH_M3_HYGL', 'url' => 'Member/list_member'),
                ),
            ),
        ),
    ),
    /* 订单模块 */
    array(
        'title' => '订单',
        'code' => 'M1_DD',
        'children' => array(
            array(
                'title' => '订单管理',
                'code' => 'DD_M2_DDGL',
                'children' => array(
                    array('name' => 'Order.list_order', 'level' => '2', 'title' => '订单管理', 'code' => 'DD_M3_DDGL', 'url' => 'Order/list_order'),
                ),
            ),
        ),
    ),
    /* 商品模块 */
    array(
        'title' => '商品',
        'code' => 'M1_SP',
        'children' => array(
            array(
                'title' => '商品管理',
                'code' => 'SP_M2_SPGL',
                'children' => array(
                    array('name' => 'ProductGoods', 'level' => '2', 'title' => '商品管理', 'code' => 'SP_M3_SPGL', 'url' => 'ProductGoods/list_product_goods',
                        'children' => array(
                            array('name' => 'ProductGoods.add', 'level' => '3', 'title' => '新增商品', 'code' => 'SP_SPGL_XZSP', 'type' => 'O'),
                            array('name' => 'ProductGoods.edit', 'level' => '3', 'title' => '编辑商品', 'code' => 'SP_SPGL_BJSP', 'type' => 'O'),
                            array('name' => 'ProductGoods.delete', 'level' => '3', 'title' => '删除商品', 'code' => 'SP_SPGL_SCSP', 'type' => 'O'),
                        ),),
                ),
            ),
            array(
                'title' => '商品类别管理',
                'code' => 'SP_M2_SPLBGL',
                'children' => array(
                    array('name' => 'ProductCategory', 'level' => '2', 'title' => '商品类别管理', 'code' => 'SP_M3_SPLBGL', 'url' => 'ProductCategory/list_category',
                        'children' => array(
                            array('name' => 'ProductCategory.add', 'level' => '3', 'title' => '新增类别', 'code' => 'SP_SPLBGL_XZLB', 'type' => 'O'),
                            array('name' => 'ProductCategory.edit', 'level' => '3', 'title' => '编辑类别', 'code' => 'SP_SPLBGL_BJLB', 'type' => 'O'),
                            array('name' => 'ProductCategory.delete', 'level' => '3', 'title' => '删除类别', 'code' => 'SP_SPLBGL_SCLB', 'type' => 'O'),
                        ),),
                ),
            ),
            array(
                'title' => '商品品牌管理',
                'code' => 'SP_M2_SPPPGL',
                'enable' => false, // 无用
                'children' => array(
                    array('name' => 'ProductBrand.list_brand', 'level' => '2', 'title' => '商品品牌管理', 'code' => 'SP_M3_SPPPGL', 'url' => 'ProductBrand/list_brand',),
                ),
            ),
            array(
                'title' => '商品规格管理',
                'code' => 'SP_M2_SPGGGL',
                'enable' => false, // 无用
                'children' => array(
                    array('name' => 'ProductSpecification.list_specification', 'level' => '2', 'title' => '商品规格管理', 'code' => 'SP_M3_SPGGGL', 'url' => 'ProductSpecification/list_specification'),
                ),
            ),
            array(
                'title' => '商品促销管理',
                'code' => 'SP_M2_SPCXGL',
                'children' => array(
                    array('name' => 'ProductPromotion.list_promotion', 'level' => '2', 'title' => '促销活动管理', 'code' => 'SP_M3_CXHDGL', 'url' => 'ProductPromotion/list_promotion'),
                ),
            ),
        )
    ),
    /* 内容模块 */
    array(
        'title' => '内容',
        'code' => 'M1_NR', // 一级菜单不要加厂商代号 2015-10-19 SoChishun Added.
        'children' => array(
            array(
                'title' => '内容管理',
                'code' => 'NR_M2_NRGL',
                'children' => array(
                    array('name' => 'Advertising.ad_list', 'level' => '2', 'title' => '网站广告管理', 'code' => 'NR_M3_WZGGGL', 'url' => 'Advertising/list_advert'),
                    array('name' => 'WebsiteMenu.list_menu', 'level' => '2', 'title' => '导航菜单管理', 'code' => 'NR_M3_DHCDGL', 'url' => 'WebsiteMenu/list_menu'),
                    array('name' => 'Channel.list_channel', 'level' => '2', 'title' => '网站栏目管理', 'code' => 'NR_M3_WZLMGL', 'url' => 'Channel/list_channel'),
                ),
            ),
        )
    ),
    /* 系统模块 */
    array(
        'title' => '系统',
        'code' => 'M1_XT', // 一级菜单不要加厂商代号 2015-10-19 SoChishun Added.
        'children' => array(
            array(
                'title' => '系统设置',
                'code' => 'XT_M2_XTSZ',
                'children' => array(
                    array('name' => 'WebsiteConf.site_setting', 'level' => '2', 'title' => '网站配置', 'code' => 'XT_M3_QTWZSZ', 'url' => 'WebsiteConf/site_setting'),
                    array('name' => 'Links.list_links', 'level' => '2', 'title' => '友情连接管理', 'code' => 'XT_M3_QTWZSZ', 'url' => 'Links/list_links'),
                    array('name' => 'Feedback.list_feedback', 'level' => '2', 'title' => '访客留言管理', 'code' => 'XT_M3_FKLY', 'url' => 'Feedback/list_feedback'),
                ),
            ),
        )
    ),
    /* 用户模块 */
    array(
        'title' => '用户',
        'code' => 'M1_YH', // 一级菜单不要加厂商代号 2015-10-19 SoChishun Added.
        'children' => array(
            array(
                'title' => '用户管理',
                'code' => 'YH_M2_YHGL',
                'children' => array(
                    array('name' => 'Admin.list_admin', 'level' => '2', 'title' => '管理员管理', 'code' => 'YH_M3_GLYGL', 'url' => 'Admin/list_admin',
                        'children' => array(
                            array('name' => 'Admin.add_user', 'level' => '3', 'title' => '新增管理员', 'code' => 'YH_YHGL_XZGLY', 'type' => 'O'),
                            array('name' => 'Admin.edit_user', 'level' => '3', 'title' => '编辑管理员', 'code' => 'YH_YHGL_BJGLY', 'type' => 'O'),
                            array('name' => 'Admin.delete_user', 'level' => '3', 'title' => '删除管理员', 'code' => 'YH_YHGL_SCGLY', 'type' => 'O'),
                        ),
                    ),
                    array('name' => 'Department.list_department', 'level' => '2', 'title' => '部门管理', 'code' => 'YH_M3_BMGL', 'url' => 'Department/list_department'),
                    array('name' => 'Role.list_role', 'level' => '2', 'title' => '角色管理', 'code' => 'YH_M3_JSGL', 'url' => 'Role/list_role'),
                ),
            ),
        )
    ),
);
